<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#idWorkContent{
				display: flex;
				align-items: center;
			}
			#idAddWork{
				display: flex;
				justify-content: flex-end;
			}
		</style>
	</head>
	<body>
		<div id="">
			<h3>工作经历</h3>
			<hr >
			<div id="workAll"></div>			
			<div id="idAddWork">
				<a href="#" onclick="addWork();">添加工作经历</a>
			</div>
			
		</div>
	</body>
	<script type="text/javascript">
		function delWork(event){
			var workAllObj = document.getElementById('workAll');
			var delTarget = event.target.parentElement;
			workAllObj.removeChild(delTarget)			
		}
		function addWork(){
			var workAllObj = document.getElementById('workAll');
			var newDiv = document.createElement('div');
			newDiv.innerHTML = `公司名称：<input type="" name="" id="" value="" />
					职位：<input type="" name="" id="" value="" />
					<a href="#" onclick="delWork(event);">删除工作经历</a>
					<br /><br />
					<div id="idWorkContent">
						工作职责及工作内容描述:<textarea rows="8" cols="100"></textarea>
					</div>				
					<hr >`
			workAllObj.appendChild(newDiv)	
		}
		onload = function(){
			addWork();
		}
	</script>
</html>
